1. Field of the Invention
The present invention relates to the recovery of data. More particularly, the present invention relates to the recovery of lost/damaged block data in a bitstream of compressed data.
2. Art Background
It is often desirable to compress data, such as video images or sound data, for transmission and storage. Typically, when data is compressed, compression constants are generated. In some instances block-wide data is generated. These constants are transmitted or stored along with the compressed image. Problems can arise if the compression constants are lost or damaged prior to decompression of the data. As an illustration, the discussion below illustrates the problems that arise if image data compression constants are lost.
The discrete data points that make up a digital image are known as pixels. Typically, each pixel is represented independently using 8 bits, but other representations also are used for the purposes of compression or analysis. Most of the alternative representations begin by dividing this raw data into disjoint sets. For historical reasons, these sets are referred to as xe2x80x9cblocksxe2x80x9d, even though they may not have a traditional block shape. The alternative representation then characterizes the data by some block-wide information and per-pixel information.
Examples of block-wide information include the minimum pixel value (MIN), the maximum pixel value (MAX), and the dynamic range of the pixel values (DR), where DR=MAXxe2x88x92MIN or DR=1+MAXxe2x88x92MIN. Per-pixel information may indicate where the pixel value lies within the range specified by the global information. For compression to be achieved, the per-pixel information must use only a few bits of storage so that the total number of bits used is less than that required to store the raw image.
In one example, the block data is comprised of the MIN, DR and Qbit number (defined below), and the pixel data is comprised of Q codes. A Q code is a Qbit number that can be an integer in the range [0, 2Q -1] that identifies one value in the set {MIN, MIN+1, . . . , MAX}. Since the Qbit number is generally small and the DR value may be relatively large, it is generally not possible to represent all pixel values exactly. Therefore, some quantization error is introduced when pixel values are reduced to Q code values. For instance, if the Qbit number is 3, then it is generally possible to represent 23=8 values from the set {MIN, MIN+1, . . . , MAX} without any error. Pixels with other values are rounded to one of these eight values. This rounding introduces quantization error.
If any of the block information, e.g., MIN, MAX or DR, is lost, the damage to the image is potentially large as many pixels are affected. For this reason, it is desirable to have techniques for accurately estimating or recovering the values of this lost data.
Recovery methods fall into two categories: decoded domain, and encoded domain. Decoded domain techniques restore portions of the image to its raw data format and then exploit local correlation properties to estimate the missing data. Data recovery, including compression constants, may be performed in the decoded domain. However, additional computation and time, and therefore additional expense, is required to perform and evaluate decodings.
The system and method of the present invention provides an innovative technique for recovering lost or damaged (lost/damaged) compression constants of a block in the encoded domain. In one embodiment, a lost/damaged compression constant is recovered by estimating a compression constant of the block using encoded data of at least one neighboring block of data and other recoverable compression constants of the block and neighboring block. For example, in one embodiment wherein the encoded data comprises image data, each block of data consists of dynamic range (DR) and Minimum (MIN) constants, where DR=MAXxe2x88x92MIN and MAX represents a maximum data value in the block.